package com.journey.org.ui.web

import android.os.Bundle
import com.journey.org.BR
import com.journey.org.R
import com.journey.org.databinding.ActivityWebBinding
import com.mvvmhabit.org.base.BaseActivity

/**
 * @Date: 2020/11/18 12:06
 * @Author:小妖
 * @Description: WebView 容器
 */
class WebActivity : BaseActivity<ActivityWebBinding, WebViewModel>() {

    override fun layoutId(savedInstanceState: Bundle?): Int = R.layout.activity_web

    override fun initVariableId(): Int = BR.viewModel

    override fun initViewModel(): Class<WebViewModel> = WebViewModel::class.java

    override fun initData() {
        super.initData()
        // https://v.qq.com/x/cover/m441e3rjq9kwpsc/b0041fx801u.html
//        mViewModel?.onLoadUrlField?.set("http://yq-official.xingekeji.cn:8042?token=" + "8b323115365638187ae4f12aef2dbf3e")
        mViewModel?.onLoadUrlField?.set(intent.extras?.getString("loadUrl"))
        // mViewModel?.onLoadUrlField?.set("https://jx.000180.top/jx/?url=https://www.iqiyi.com/v_eijm10wnkc.html")
        mViewModel?.onToolbarTitleField?.set(intent.extras?.getString("title"))
    }
}
